<style>
    body{
        background-color: #fff;
    }
</style>
<div>
    <ul class="nav nav-tabs" role="tablist">
        {% for type,data in trackRows %}
            <li role="presentation" {% if loop.first %}class="active"{% endif %}>
                <a href="#track{{ loop.index }}" aria-controls="track{{ loop.index }}" role="tab" data-toggle="tab">{{ data['name'] }}</a>
            </li>
        {% endfor %}
    </ul>

    <div class="tab-content">
        {% for type,data in trackRows %}
            <div role="tabpanel" class="tab-pane{% if loop.first %} active{% endif %}" id="track{{ loop.index }}">
                <table class="table table-hover">
                    <tr class="info">
                        <th style="width: 50%;">任务名</th>
                        <th>状态</th>
                        <th style="text-align: center">创建时间</th>
                    </tr>
                    {% for row in data['rows'] %}
                        <tr>
                            <td>{{ row['sTaskName'] }}</td>
                            <td>{{ row['iState'] }}</td>
                            <td style="text-align: center">{{ row['tCreateDate'] }}</td>
                        </tr>
                    {% endfor %}
                    <tr class="success">
                        <td>
                            <a style="cursor: pointer;" onclick="window.top.xhTop.createNewTab('{{ data['name'] }}跟踪', '{{ url('Track/trackTaskList?isAdd=true&iTaskType='~type) }}', true)">新增任务</a>
                        </td>
                        <td colspan="2" style="text-align: center;">
                            <a style="cursor: pointer;" onclick="window.top.xhTop.createNewTab('{{ data['name'] }}跟踪', '{{ url('Track/trackTaskList?iTaskType='~type) }}', true)">查看更多...</a>
                        </td>
                    </tr>
                </table>
            </div>
        {% endfor %}
    </div>
</div>